﻿<UserControl x:Class="Framework.UI.TestHarness.Views.MenuItemView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:params="http://schemas.codeplex.com/elysium/params"
             xmlns:extra="http://schemas.extra.com/ui"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Grid Background="{StaticResource BackgroundBrush}">
            <Grid.ContextMenu>
                <ContextMenu>
                    <MenuItem Style="{StaticResource PrintMenuItemStyle}">
                        <MenuItem Style="{StaticResource PrintMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource PrintPreviewMenuItemStyle}"/>
                    </MenuItem>
                    <MenuItem Style="{StaticResource ExportMenuItemStyle}">
                        <MenuItem Style="{StaticResource ExportMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource ExportCsvMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource ExcelMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource WordMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource OutlookMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource PowerPointMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource PdfMenuItemStyle}"/>
                    </MenuItem>
                    <MenuItem Style="{StaticResource ExpandCollapseMenuItemStyle}">
                        <MenuItem Style="{StaticResource ExpandMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource CollapseMenuItemStyle}"/>
                    </MenuItem>
                    <MenuItem Style="{StaticResource SaveMenuItemStyle}">
                        <MenuItem Style="{StaticResource SaveMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource SaveAsMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource SaveAllMenuItemStyle}"/>
                    </MenuItem>
                    <MenuItem Style="{StaticResource ZoomMenuItemStyle}">
                        <MenuItem Style="{StaticResource ZoomInMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource ZoomOutMenuItemStyle}"/>
                    </MenuItem>
                    <MenuItem Style="{StaticResource ViewMenuItemStyle}">
                    </MenuItem>
                    <MenuItem Style="{StaticResource ColumnChooserMenuItemStyle}">
                        <MenuItem Style="{StaticResource ShowAmountMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource ShowPercentageMenuItemStyle}"/>
                    </MenuItem>
                    <MenuItem Style="{StaticResource AlignMenuItemStyle}">
                        <MenuItem Style="{StaticResource TextLeftAlignMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource TextCenterAlignMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource TextRightAlignMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource TextJustifyAlignMenuItemStyle}"/>
                    </MenuItem>
                    <MenuItem Style="{StaticResource ListMenuItemStyle}">
                        <MenuItem Style="{StaticResource BulletMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource NumberingMenuItemStyle}"/>
                    </MenuItem>
                    <MenuItem Header="Slider Menu Items">
                        <MenuItem Style="{StaticResource DecimalPlacesMenuItemStyle}">
                            <MenuItem Header="0"
                                      Style="{StaticResource DecimalPlacesSliderMenuItemStyle}"/>
                        </MenuItem>
                        <MenuItem Style="{StaticResource ZoomMenuItemStyle}">
                            <MenuItem Header="1"
                                      Style="{StaticResource ZoomSliderMenuItemStyle}"/>
                        </MenuItem>
                        <MenuItem Style="{StaticResource FontSizeMenuItemStyle}">
                            <MenuItem Header="12"
                                      Style="{StaticResource FontSizeSliderMenuItemStyle}"/>
                        </MenuItem>
                    </MenuItem>
                    <MenuItem Header="Arrows">
                        <MenuItem Style="{StaticResource NextMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource PreviousMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource UpMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource DownMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource TopMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource BottomMenuItemStyle}"/>
                    </MenuItem>
                    <MenuItem Header="Standard">
                        <MenuItem Style="{StaticResource CutMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource CopyMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource PasteMenuItemStyle}"/>
                        <Separator/>
                        <MenuItem Style="{StaticResource UndoMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource RedoMenuItemStyle}"/>
                    </MenuItem>
                    <MenuItem Header="Folder">
                        <MenuItem Style="{StaticResource FolderNewMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource FolderOpenMenuItemStyle}"/>
                    </MenuItem>
                    <MenuItem Header="Other">
                        <MenuItem Style="{StaticResource AddMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource RemoveMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource DeleteMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource OkMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource CancelMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource RefreshMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource HomeMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource OpenMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource CloseMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource EditMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource HelpMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource ReloadMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource SearchMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource SettingsMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource DecimalPlacesMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource DisplayMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource PublishMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource UnpublishMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource RenameMenuItemStyle}"/>
                        <MenuItem Style="{StaticResource HorizontalVerticalMenuItemStyle}"/>
                    </MenuItem>
                </ContextMenu>
            </Grid.ContextMenu>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource HeaderTextStyle}" 
                       Text="MenuItem Styles"/>
            
            <TextBlock Grid.Row="2" 
                       Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource NormalTextStyle}" 
                       Text="Right click anywhere. (See App Bar tab too) Styles have been setup for each MenuItem used in the application so that the menus are consistent. The styles include the icon and text for the button and should not be changed. If you need a new MenuItem not found here, use SyncFusion MetroStudio 2 to get the XAML for the icon and come up with a new style (Very Easy). If you add any new MenuItem styles add them here."
                       TextAlignment="Center"/>
            
        </Grid>

        <Grid Grid.Row="1"
              Background="{StaticResource BackgroundBrush}">
            <Grid.ContextMenu>
                <ContextMenu>
                    <MenuItem extra:MenuItemAttached.GroupName="Group"  
                              Header="Property 1"
                              IsCheckable="True"
                              IsChecked="{Binding Mode=TwoWay, Path=Property1}"/>
                    <MenuItem extra:MenuItemAttached.GroupName="Group"  
                              Header="Property 2"
                              IsCheckable="True"
                              IsChecked="{Binding Mode=TwoWay, Path=Property2}"/>
                    <MenuItem extra:MenuItemAttached.GroupName="Group"  
                              Header="Property 3"
                              IsCheckable="True"
                              IsChecked="{Binding Mode=TwoWay, Path=Property3}"/>
                </ContextMenu>
            </Grid.ContextMenu>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <TextBlock Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource HeaderTextStyle}" 
                       Text="MenuItem GroupName (Like RadioButton GroupName)"/>
            
            <TextBlock Grid.Row="2" 
                       Margin="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"
                       Style="{StaticResource NormalTextStyle}" 
                       Text="Right click anywhere. The MenuItemAttached.GroupName property can be used to treat check-able menu items like radio buttons, where only one item can be checked at any one time. Don't forget to use TwoWay Bindings for this to work."
                       TextAlignment="Center"/>

        </Grid>

    </Grid>
</UserControl>
